using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace ProjectManageSystemApi.DbEntity
{

	/// <summary>
	/// 员工打卡信息表
	/// </summary>
	[JsonObject(MemberSerialization.OptIn), Table(Name = "user_check_info", DisableSyncStructure = true)]
	public partial class UserCheckInfo {

		[JsonProperty, Column(Name = "id", DbType = "int(11) unsigned", IsPrimary = true, IsIdentity = true)]
		public uint Id { get; set; }

		/// <summary>
		/// 用户id
		/// </summary>
		[JsonProperty, Column(Name = "user_id")]
		public long UserId { get; set; }

		/// <summary>
		/// 考勤日期
		/// </summary>
		[JsonProperty, Column(Name = "belongs_date", DbType = "date")]
		public DateTime BelongsDate { get; set; }

		/// <summary>
		/// 上班时间
		/// </summary>
		[JsonProperty, Column(Name = "clock_in_date", DbType = "datetime")]
		public DateTime? ClockInDate { get; set; }

		/// <summary>
		/// 上班打卡图片
		/// </summary>
		[JsonProperty, Column(Name = "clock_in_pic_url", StringLength = 200)]
		public string ClockInPicUrl { get; set; }

		/// <summary>
		/// 下班时间
		/// </summary>
		[JsonProperty, Column(Name = "clock_out_date", DbType = "datetime")]
		public DateTime? ClockOutDate { get; set; }

		/// <summary>
		/// 下班打卡图片
		/// </summary>
		[JsonProperty, Column(Name = "clock_out_pic_url", StringLength = 200)]
		public string ClockOutPicUrl { get; set; }


		[Navigate(nameof(UserId))]
		public UserInfo UserInfo { get; set; }

		[Navigate(nameof(UserCheckDetail.UserCheckId))]
		public List<UserCheckDetail> Details { get; set; } = new List<UserCheckDetail>();
	}

}
